home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / TC Prog Guide.cpt / picture ƒ / segment.h < prev    next >
Text File  |  1991-02-16  |  1KB  |  47 lines

  1. /*
  2. *    FILE:        segment.h
  3. *    AUTHOR:        R. Gonzalez
  4. *    CREATED:    October 2, 1990
  5. *
  6. *    Defines general-purpose segment and nested segments for picture
  7. *    application.  All graphics figures descend from Segment.
  8. */
  9.  
  10. # ifndef    segment_h
  11. # define    segment_h
  12.  
  13. # include    "class.h"
  14. # include    "trans.h"
  15. # include    "camera.h"
  16. # include    "project.h"
  17. # include    "color.h"
  18.  
  19. # define    MAX_SEGMENTS    50
  20.  
  21. /******************************************************************
  22. *   abstract segment
  23. ******************************************************************/
  24. struct    Segment:Generic_Class
  25. {
  26.     virtual void    set_color(color);
  27.     virtual void    draw(Camera*,Projector*,Transformation*);
  28.     virtual void    move(Transformation*);
  29. };
  30.  
  31. /******************************************************************
  32. *   abstract nested segment
  33. ******************************************************************/
  34. struct    Nested_Segment:Segment
  35. {
  36.     Transformation    *transformation;
  37.     Segment            *segment[MAX_SEGMENTS];
  38.     int                num_segments;
  39.     
  40.     boolean            init(void);
  41.     void            set_color(color);
  42.     void            draw(Camera*,Projector*,Transformation*);
  43.     void            move(Transformation*);
  44.     boolean            destroy(void);
  45. };
  46.  
  47. # endif